package sz.szsmk.citizencard.ui.newversion.fragment.adapter

import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.BaseAdapter
import android.widget.TextView
import sz.szsmk.citizencard.R
import sz.szsmk.citizencard.ui.newversion.bean.AppealTypeVo


/**
 *  author : hyt
 *  date : 2020/8/13
 *  description :
 */
class AppealTypeAdapter(var context:Context,var appealTypeVoList: List<AppealTypeVo>) : BaseAdapter() {


    override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View {
        var convertView1 =  LayoutInflater.from(context).inflate(R.layout. layout_logoffspinner, null)
        if(convertView1!=null){
            convertView1.findViewById<TextView>(R.id.tv_title).text = appealTypeVoList[position].appealTypeName
        }
        return convertView1
    }

    override fun getItem(position: Int) = appealTypeVoList[position]

    override fun getItemId(position: Int) = position.toLong()

    override fun getCount() = appealTypeVoList.size
}